package com.seari.custody.enums;

/**
 * 技审意见流程状态
 */
public enum  TechnicalAuditStatus {
    PENDING("待处理", "1"),
    DATA_PROOFREADING("资料校对", "2"),
    PROCESSING("处理中", "3"),
    HAS_BEEN_SENT("已发送", "4"),
    DATA_REJECT_PROCESSED("技术要求表被退回待处理", "5"),
    DATA_MODIFY_ACK("技术要求表被修改待确认", "6"),
    DONE("已完结", "7");

    private String type;

    private String desc;

     TechnicalAuditStatus(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }


    public static String getValue(String type) {
        TechnicalAuditStatus[] carTypeEnums = values();
        for (TechnicalAuditStatus technicalAuditStatus : carTypeEnums) {
            if (technicalAuditStatus.type().equals(type)) {
                return technicalAuditStatus.desc();
            }
        }
        return null;
    }

    public  String getType(String desc) {
        TechnicalAuditStatus[] carTypeEnums = values();
        for (TechnicalAuditStatus technicalAuditStatus : carTypeEnums) {
            if (technicalAuditStatus.desc().equals(desc)) {
                return technicalAuditStatus.type();
            }
        }
        return null;
    }


    private String type() {
        return this.type;
    }

    private String desc() {
        return this.desc;
    }
}
